.vue3-easy-data-table {
  border: var(--easy-table-border);
  position: relative;
  box-sizing: border-box;
}
.vue3-easy-data-table__main {
  border: none;
  width: 100%;
  overflow: auto;
  background-color: var(--easy-table-body-row-background-color);

  &::-webkit-scrollbar-track
  {
    border-radius: 10px;
    background-color: var(--easy-table-scrollbar-track-color);
  }

  &::-webkit-scrollbar
  {
    width: 7px;
    height: 7px;
    background-color: var(--easy-table-scrollbar-color);
  }

  &::-webkit-scrollbar-thumb
  {
    border-radius: 10px;
    background-color: var(--easy-table-scrollbar-thumb-color);
  }

  &::-webkit-scrollbar-corner
  {
    background-color: var(--easy-table-scrollbar-corner-color);
  }

  &.table-fixed {
    table {
      table-layout: fixed;
    }
  }
  &.show-shadow {
    th.shadow, td.shadow {
      &::after {
        box-shadow: inset 6px 0 5px -3px rgb(0 0 0 / 20%);
      }
    }
  }
  &.fixed-header {
    th {
      position: sticky;
      top: 0;
      z-index: 2;
    }
  }
  &.hoverable {
    tr:hover td {
      background-color: var(--easy-table-body-row-hover-background-color);
      color: var(--easy-table-body-row-hover-font-color);
    }

    .vue3-easy-data-table__body.row-alternation {
      .even-row:hover td {
        color: var(--easy-table-body-row-hover-font-color);
        background-color: var(--easy-table-body-row-hover-background-color);
      }
    }
  }
  &.border-cell {
    .vue3-easy-data-table__header th {
      border-right: var(--easy-table-row-border);
    }

    .vue3-easy-data-table__header th:last-of-type {
      border-right: none;
    }

    .vue3-easy-data-table__body td {
      border-right: var(--easy-table-row-border);
    }
    .vue3-easy-data-table__body td:last-of-type {
      border-right: none;
    }
  }
}

.vue3-easy-data-table__body.row-alternation {
  tr.even-row td {
    color: var(--easy-table-body-even-row-font-color);
    background-color: var(--easy-table-body-even-row-background-color);
  }
}

table {
  border-collapse: initial;
  display: table;
  width: 100%;
  border-spacing: 0;
  margin: 0px;
}
// fixed-columns feature related
.vue3-easy-data-table__header, vue3-easy-data-table__body {
  position: relative;
}
.vue3-easy-data-table__header tr {
  font-size: var(--easy-table-header-font-size);
  border: none;
  height: var(--easy-table-header-height);
}
.vue3-easy-data-table__header th {
  background-color: var(--easy-table-header-background-color);
  color: var(--easy-table-header-font-color);
  border: none;
  border-bottom: var(--easy-table-row-border);

  padding: var(--easy-table-header-item-padding);

  position: relative;
  .header {
    display: flex;
    align-items: center;
    &.direction-left {
      justify-content: flex-start;
    }
    &.direction-center {
      justify-content: center;
    }
    &.direction-right {
      justify-content: flex-end;
    }
  }

  &.sortable {
    cursor: pointer;
    .sortType-icon {
      border: 5px solid transparent;
      margin-top: -3px;
      margin-left: 4px;
      display: inline-block;
      height: 0;
      width: 0;
      position: relative;
      border-bottom-color: var(--easy-table-header-font-color);
    }

    .multi-sort__number {
      border-radius: 50%;
      height: 1.5em;
      width: 1.5em;
      line-height: 1.5em;
      margin-left: 4px;
      background-color: var(--easy-table-header-font-color);
      color: var(--easy-table-header-background-color);
    }

    &.none {
      &:hover {
        .sortType-icon {
          opacity: 1;
        }
      }
      .sortType-icon {
        opacity: 0;
        transition: 0.5s ease;
      }
    }
    &.desc {
      .sortType-icon {
        margin-top: 5px;
        transform: rotate(180deg);
      }
    }
  }
}

// fixed-columns feature related
.vue3-easy-data-table__header th, .vue3-easy-data-table__body td {
  &.shadow {
    &::after {
      pointer-events: none;
      content: "";
      width: 36px;
      display: inline-block;
      height: 100%;
      position: absolute;
      top: 0px;
      right: -36px;
      box-shadow: none;
    }
  }
}
.vue3-easy-data-table__body tr {
  height: var(--easy-table-body-row-height);
  color: var(--easy-table-body-row-font-color);
  font-size: var(--easy-table-body-row-font-size);

  // &:nth-child(-n+3) {
  //   td {
  //     border-bottom: var(--easy-table-row-border)!important;
  //   }
  // }
  &:last-child {
    td {
      border-bottom: none;
    }
  }
  &:first-child {

    td {
      border-bottom: var(--easy-table-row-border);
    }
  }
}

.vue3-easy-data-table__body td {
  padding: var(--easy-table-body-item-padding);
  background-color: var(--easy-table-body-row-background-color);
  border: none;
  border-bottom: var(--easy-table-row-border);

  &.direction-left {
    text-align: left;
  }

  &.direction-center {
    text-align: center;
  }

  &.direction-right {
    text-align: right;
  }

  position: relative;
  .expand-icon {
    border: solid;
    border-color: var(easy-table-body-row-font-color);

    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(-45deg);
    transition: 0.2s;
    &.expanding {
      transform: rotate(45deg);
    }
  }
}

// expandable row feature related
.vue3-easy-data-table__body td.expand {
  position: relative;
  .expand-loading {
    position: absolute;
    top: 0px;
    left: 0px;
  }
}
.vue3-easy-data-table__body td.can-expand {
  cursor: pointer;
}

.vue3-easy-data-table__footer {
  background-color: var(--easy-table-footer-background-color);
  color: var(--easy-table-footer-font-color);
  border-top: var(--easy-table-row-border);
  font-size: var(--easy-table-footer-font-size);
  height: var(--easy-table-footer-height);
  padding: var(--easy-table-footer-padding);

  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;

  .pagination__rows-per-page {
    display: flex;
    align-items: center;
  }
  .pagination__items-index {
    margin: 0px 20px 0px 10px;
  }
}
.vue3-easy-data-table__message {
  color: var(--easy-table-message-font-color);
  font-size: var(--easy-table-message-font-size);
  padding: var(--easy-table-message-padding);

  text-align: center;
}
.vue3-easy-data-table__loading {
  z-index: 3;
  overflow: hidden;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0px;
  left: 0px;
  display: flex;
  align-items: center;
  justify-content: center;

  .loading-entity {
    z-index: 1;
  }
}
.vue3-easy-data-table__loading-mask {
  background-color: var(--easy-table-loading-mask-background-color);
  opacity: var(--easy-table-loading-mask-opacity);

  position: absolute;
  width: 100%;
  height: 100%;
  top: 0px;
  left: 0px;
  z-index: 1;
}